<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${ctx}/assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="${ctx}/assets/css/index.css?v=2.3">
</head>
<body class="bg-white">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed am-border-bottom">
    <div class="am-header-left am-header-nav">
        <a  onclick="history.go(-1)"> <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        我的报告
    </h1>

    <div class="am-header-right am-header-nav">
        <a id="btnfeedback">
            <i class="icon_63"></i>
        </a>
    </div>
</header>
<section class="am-padding-bottom-sm" id="amz-main" data-tag="css-nav">
<div class="report_list">
    
    
</div>
</section>

<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">问题反馈</div>
        <div class="am-modal-bd">
            <textarea rows="3" class="mark_content am-modal-prompt-input" placeholder="对本产品有什么建议，敬请告知，谢谢！"></textarea>
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>提交</span>
        </div>
    </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm3">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">佐心科技</div>
        <div class="am-modal-bd">
           请输入吐槽内容
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm4">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">佐心科技</div>
        <div class="am-modal-bd">
           感谢您的热心回馈，谢谢!
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>

<script src="${ctx}/assets/js/jquery.min.js"></script>
<script src="${ctx}/assets/js/amazeui.min.js"></script>
<script>
    $(function () {
    
    	var baseResponse=$.ajax({url:"${ctx}/getMyReport",async:false});
    	var baogaoJson=JSON.parse(baseResponse.responseText);
		if(baogaoJson.resultCode=="0"){
			var html="";
			for(var i=0;i<baogaoJson.myBaoGaoList.length;i++){
				html+="<div class='report_item bg-gray am-margin-left-sm am-margin-right-sm am-margin-top-sm'>";
			    html+="    <div class='am-g   am-padding-top-sm border-1'>";
			    html+="        <div class=' am-u-sm-12 am-list-main font-color-13 box'>";
			    html+="            <i class='icon_12'></i>";
			    html+="           <div class='width-50px'>";
			    html+="               <div class='icon_9-1'></div>";
			    html+="           <div class='line-1'>";
			    html+="               <i class='circle-1'></i>";
			    html+="           </div>";
			    html+="               <div class='line-2'>";
			    html+="                   <i class='circle-1'></i>";
			    html+="               </div>";
			    html+="           </div>";
			    html+="           <div class='box-1'>";
			    html+="           <div class='am-list-item-hd font-color-main am-padding-top-sm'>";
			    html+=baogaoJson.myBaoGaoList[i].baogaoTitle;
			    html+="           </div>";
			    html+="            <div class='font-14  margin-top-10'>";
			    html+="       评估时间："+baogaoJson.myBaoGaoList[i].baogaoTime.substr(0,10);
			    html+="           </div>";
			    html+="           <div class='font-14  margin-top-10 am-padding-bottom-xs'>";
			    html+=baogaoJson.myBaoGaoList[i].baogaoContent;
			    html+="           </div></div>";
			    html+="       </div>";
			    html+="       <div class='am-u-sm-12 am-margin-top-xs'>";
			    html+="           <div class='border-tops font-color-12 am-text-right am-padding-top-sm am-padding-bottom-sm prelative padding-right-20' onclick='window.location.href='9.html''>";
			    html+="               <i class='icon_120'></i><span onclick='window.location.href=\"pingguBaogao.jsp?baogaoId="+baogaoJson.myBaoGaoList[i].baogaoId+"\"'>查看报告</span>";
			    html+="           </div>";
			    html+="       </div>";
			    html+="   </div>";
			    html+="</div>";   
		    }
		    $(".report_list").html(html); 
		}
    
        $('#btnfeedback').on('click', function () {
            $('#my-prompt').modal({
                relatedTarget: this,
                onConfirm: function (e) {
                    var msg=e.data;
                    if(""==msg){
                		$('#my-confirm3').modal({
                     relatedTarget: this,
                     onConfirm: function(options) {
                     },
                     // closeOnConfirm: false,
                     onCancel: function() {

                     }
                });
                		return false;
                	}
                    var gotoTuCao=$.ajax({url:"${ctx}/gotoTuCao?content="+e.data,async:false});
				    var gotoTuCaoJson=JSON.parse(gotoTuCao.responseText);
				    if(gotoTuCaoJson.resultCode=="0"){
				    	$('#my-confirm4').modal({
                     relatedTarget: this,
                     onConfirm: function(options) {
                     },
                     // closeOnConfirm: false,
                     onCancel: function() {

                     }
                });
				    }
                },
                onCancel: function (e) {
//                    alert('不想说!');
                }
            });
        });




    });
</script>
</body>
</html>